As a liquid ejecting apparatus that ejects liquid from nozzles, a multifunction peripheral having a printer unit is proposed. In the printer unit of this multifunction peripheral, ink is ejected from a recording head while moving a carriage in the scanning direction. Further, the printer unit of this multifunction peripheral includes a linear encoder having an encoder strip and a sensor unit, as a velocity detecting apparatus that detects velocity of the carriage. The encoder strip extends in the scanning direction, and is formed with encoder slits with particular intervals in the scanning direction. With this configuration, the encoder strip has optically non-transmissive regions without encoder slit and optically transmissive regions formed with encoder slits, that are arranged cyclically in the scanning direction. The sensor unit is provided at the carriage, and has a light emitting element and a light receiving element that are arranged with the encoder strip interposed therebetween. With this configuration, in the sensor unit, the amount of light received by the light receiving element is larger when the light emitting element and the light receiving element face the encoder slit (face an optically transmissive region) than when the light emitting element and the light receiving element do not face the encoder slit (face an optically non-transmissive region). And, the sensor unit outputs a pulse signal corresponding to changes of the amount of light received by the light receiving element. Due to this pulse signal, moving velocity of the carriage can be detected.